//
//  LXMyGroupViewCell.m
//  LvXi_newVersion
//
//  Created by 诸葛孔明 on 16/8/16.
//  Copyright © 2016年 SJT. All rights reserved.
//............................................................................................//
//......................................我的团队-cell..................................//
//............................................................................................//

#import "LXMyGroupViewCell.h"

@interface LXMyGroupViewCell()
/**底部下划线*/
@property (nonatomic,weak) UIView *bottomLine;

@end

@implementation LXMyGroupViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:reuseIdentifier]) {
        
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        
        UIView *bottomLine = [[UIView alloc] init];
        bottomLine.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:bottomLine];
        self.bottomLine = bottomLine;
        
        self.textLabel.font = [UIFont systemFontOfSize:15];
        self.detailTextLabel.font = [UIFont systemFontOfSize:10];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.bottomLine.x = 0;
    self.bottomLine.height = 0.2;
    self.bottomLine.width = self.width;
    self.bottomLine.y = self.height - self.bottomLine.height;
    
    self.imageView.width = MineRatio(41);
    self.imageView.height = self.imageView.width;
    self.imageView.x = 12;
    self.imageView.y = (self.height - self.imageView.height) / 2;
    
    self.textLabel.width = [self.textLabel.text sizeInAre:MaxSize font:self.textLabel.font].width;
    self.textLabel.height = [self.textLabel.text sizeInAre:MaxSize font:self.textLabel.font].height;
    self.textLabel.x = self.imageView.right + 11;
    self.textLabel.y = self.height * 0.5 - self.textLabel.height * 0.5;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
